import request, { mcRequest } from '@/utils/request.js';



// 获取所有的列表
export async function fetch_all_phase() {
  return request(`mp/phase`)
}

// 获取[多个]列表中的案件
export async function fetch_cases_by_phase_ids(phase_ids) {
  return request(`mp/fetch_cases_by_phase_ids`, {
    method: 'POST',
    body: {
      "phase_ids": phase_ids
    }
  });
}

// 更新案件的标签
export async function update_tag_by_case_id(caseId, tags) {
  return request(`mp/update_tag_by_case_id`, {
    method: 'POST',
    body: {
      "case_id": caseId,
      "tags": tags
    }
  });
}

// 单个案件的详细页面

// 获取案件的详情
export async function fetch_case_by_id(caseId) {
  return request(`mp/fetch_case_by_id/${caseId}`)
}

// 获取案件的附件列表
export async function fetch_attachments_by_case_id(caseId) {
  return request(`mp/fetch_attachments_by_case_id/${caseId}`)
}

// 获取案件的评论列表
export async function fetch_comments_by_case_id(caseId) {
  return request(`mp/fetch_comments_by_case_id/${caseId}`)
}

// 获取案件的任务列表
export async function fetch_tasks_by_case_id(caseId) {
  return request(`mp/fetch_tasks_by_case_id/${caseId}`)
}

